package com.mk;

import act.Act;
import act.job.OnAppStart;
import com.mk.properties.AppConfig;
import com.mk.util.Redis;
import com.mk.util.WechatUtils;
import me.hao0.wechat.core.WechatBuilder;
import org.osgl.logging.L;
import org.osgl.logging.Logger;

@SuppressWarnings("all")
public class Starter {
    private final static String APPNAME = "demo";
    public final static Logger LOG = L.get(APPNAME);


    public static void main(String[] args) throws Exception {
        // 这里无法知道是不是开发模式，所以导致 生产下启动，也会提交api
        // 只有在app启动完毕后，才能知道是否是开发模式，但此时无法获取类的注解
//        DocUtil.DocScan2("http://doc.emeker.com/", "demo", "0.0.1", "demo后台", "com.mk.service");
        Act.start(APPNAME);
    }


    @OnAppStart
    public static void init() {
        WechatUtils.wechat = WechatBuilder.newBuilder(AppConfig.weixin.appid.get(), AppConfig.weixin.appsec.get()).build();
        Redis.init();
    }
}
